package com.xk.mapper;

import com.xk.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //根据username和password

    @Select("SELECT COUNT(1) FROM user WHERE username = #{username} AND password = #{password}")
    public boolean checklogin(User user);

    @Insert("INSERT INTO user (username, password) VALUES (#{username}, #{password})")
    public int addUser(User user);
}
